import Image from "next/image";
import Link from "next/link";

export default function CourseCard(props) {
  return (
    <Link href={`/course/${props.course.id}`}>
      <a className="card col p-0 mx-2">
        <Image src={props.course.cover} className="card-img-top" height="240" width="auto"></Image>
        <div className="card-body">
          <p className="card-text">{props.course.name}</p>
        </div>
      </a>
    </Link>
  );
}
